<!-- HTML header for doxygen 1.9.7-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.13.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<title>libsir: The Standard Incident Reporter Library</title>
<!-- OpenGraph -->
<meta property="og:title" content="libsir: The Standard Incident Reporter Library">
<meta property="og:description" content="A lightweight, cross-platform C library for information distribution">
<meta property="og:url" content="https://libsir.rml.dev">
<meta property="og:type" content="website">
<meta property="og:image" content="https://libsir.rml.dev/res/libsir-og.png">
<meta name="twitter:card" content="summary_large_image"></meta>
<meta name="twitter:title" content="libsir: The Standard Incident Reporter Library"></meta>
<meta name="twitter:description" content="A lightweight, cross-platform C library for information distribution"></meta>
<meta name="twitter:image" content="https://libsir.rml.dev/res/libsir-og.png"></meta>
<!-- /OpenGraph -->
<!-- favicon -->
<link rel="icon" href="res/libsir-icon.png">
<link rel="icon" href="res/libsir-icon.svg" type="image/svg+xml">
<link rel="manifest" href="res/icons.webmanifest">
<!-- /favicon -->
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
<link href="rml-navtree.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">libsir<span id="projectnumber">&#160;2.2.6</span>
   </div>
   <div id="projectbrief">Standard Incident Reporter</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.13.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search',true);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('classsir_1_1default__policy.html',''); initResizable(true); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle"><div class="title">sir::default_policy Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>In the event that no custom configuration or behavior is desired, provides defaults for everything.  
 <a href="#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for sir::default_policy:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classsir_1_1default__policy__inherit__graph.svg" width="135" height="108"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a1acad8a59d338fcdba4b6a7bfa7711f4" id="r_a1acad8a59d338fcdba4b6a7bfa7711f4"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1acad8a59d338fcdba4b6a7bfa7711f4">get_init_data</a> (<a class="el" href="group__publictypes.html#structsirinit">sirinit</a> &amp;data) const noexcept final</td></tr>
<tr class="memdesc:a1acad8a59d338fcdba4b6a7bfa7711f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called by logger before initializing libsir.  <br /></td></tr>
<tr class="separator:a1acad8a59d338fcdba4b6a7bfa7711f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae73d8edbd0dc7ba668c59634511efa87" id="r_ae73d8edbd0dc7ba668c59634511efa87"><td class="memItemLeft" align="right" valign="top">constexpr bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae73d8edbd0dc7ba668c59634511efa87">on_init_complete</a> () const noexcept final</td></tr>
<tr class="memdesc:ae73d8edbd0dc7ba668c59634511efa87"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called by logger immediately after libsir has been initialized.  <br /></td></tr>
<tr class="separator:ae73d8edbd0dc7ba668c59634511efa87"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="inherited" name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_static_methods_classsir_1_1policy"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pub_static_methods_classsir_1_1policy')"><img src="closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="classsir_1_1policy.html">sir::policy</a></td></tr>
<tr class="memitem:abd4159da84207f2bcbd9fd2ce78e2640 inherit pub_static_methods_classsir_1_1policy" id="r_abd4159da84207f2bcbd9fd2ce78e2640"><td class="memItemLeft" align="right" valign="top">static constexpr bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsir_1_1policy.html#abd4159da84207f2bcbd9fd2ce78e2640">throw_on_error</a> () noexcept</td></tr>
<tr class="memdesc:abd4159da84207f2bcbd9fd2ce78e2640 inherit pub_static_methods_classsir_1_1policy"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines whether or not exceptions are thrown in the event that an unercoverable error is encountered by logger or its associated adapter(s).  <br /></td></tr>
<tr class="separator:abd4159da84207f2bcbd9fd2ce78e2640 inherit pub_static_methods_classsir_1_1policy"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>In the event that no custom configuration or behavior is desired, provides defaults for everything. </p>
<ul>
<li>Uses all default values for <a class="el" href="group__publicfuncs.html#gaa4f5707f5e4ed9702cde75a8c80c4e4a" title="Initializes libsir for use.">sir_init</a></li>
<li>Performs no post-initialization configuration</li>
<li>Exceptions are thrown when errors are encountered </li>
</ul>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a1acad8a59d338fcdba4b6a7bfa7711f4" name="a1acad8a59d338fcdba4b6a7bfa7711f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1acad8a59d338fcdba4b6a7bfa7711f4">&#9670;&#160;</a></span>get_init_data()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool sir::default_policy::get_init_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__publictypes.html#structsirinit">sirinit</a> &amp;</td>          <td class="paramname"><span class="paramname"><em>data</em></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel inline">inline</span><span class="mlabel final">final</span><span class="mlabel virtual">virtual</span><span class="mlabel noexcept">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Called by logger before initializing libsir. </p>
<p>Provides the policy with an opportunity to customize the initial configuration.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__publictypes.html#structsirinit" title="libsir initialization and configuration data.">sirinit</a> </dd>
<dd>
<a class="el" href="group__publicfuncs.html#gac21fb86ac7e7710400bf8b642887ad96" title="Fills out a sirinit structure with default values.">sir_makeinit</a></dd></dl>
<dl class="section note"><dt>Note</dt><dd>For the default configuration, pass the address of data to <a class="el" href="group__publicfuncs.html#gac21fb86ac7e7710400bf8b642887ad96" title="Fills out a sirinit structure with default values.">sir_makeinit</a>.</dd>
<dd>
Most, if not all of the options chosen during initialization can be modified post-initialization.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>Reference to a <a class="el" href="group__publictypes.html#structsirinit" title="libsir initialization and configuration data.">sirinit</a> struct representing the initial configuration.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if data is ready to pass to <a class="el" href="group__publicfuncs.html#gaa4f5707f5e4ed9702cde75a8c80c4e4a" title="Initializes libsir for use.">sir_init</a>, or false if an error occurred. Returning false will cause logger to abort the initialization process, and possibly throw an exception. </dd></dl>

<p>Implements <a class="el" href="classsir_1_1policy.html#ad90f4955785ed7bc45c9a5136f0f6a4d">sir::policy</a>.</p>

</div>
</div>
<a id="ae73d8edbd0dc7ba668c59634511efa87" name="ae73d8edbd0dc7ba668c59634511efa87"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae73d8edbd0dc7ba668c59634511efa87">&#9670;&#160;</a></span>on_init_complete()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool sir::default_policy::on_init_complete </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel inline">inline</span><span class="mlabel constexpr">constexpr</span><span class="mlabel final">final</span><span class="mlabel virtual">virtual</span><span class="mlabel noexcept">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Called by logger immediately after libsir has been initialized. </p>
<p>This is the moment in time which should be utilized for further configuration than is possible via <a class="el" href="group__publicfuncs.html#gaa4f5707f5e4ed9702cde75a8c80c4e4a" title="Initializes libsir for use.">sir_init</a> alone.</p>
<p>Some potential actions include:</p><ul>
<li>Setting the color mode for stdio (<a class="el" href="group__publicfuncs.html#ga31639aba9a825f957a73689ef509f33d" title="Sets the ANSI color mode for stdio destinations.">sir_setcolormode</a>)</li>
<li>Setting text styles on a per-level basis for stdio (<a class="el" href="group__publicfuncs.html#ga1a4726075fbcea9fc311f059e342213f" title="Set new text styling for stdio (stdout/stderr) destinations on a per-level basis.">sir_settextstyle</a>)</li>
<li>Adding log files (<a class="el" href="group__publicfuncs.html#gaa04f4ca1fc06e1d99ca4f0fd6422b573" title="Adds a log file and registers it to receive log output.">sir_addfile</a>)</li>
<li>Loading plugins (<a class="el" href="group__publicfuncs.html#ga1a50b52b3ce1af7543b76a219ff01060" title="Loads a plugin module from disk.">sir_loadplugin</a>)</li>
</ul>
<dl class="section return"><dt>Returns</dt><dd>true if configuration was completed successfully, or false if an error occurred. Returning false will cause logger to abort the initialization process, and possibly throw an exception. </dd></dl>

<p>Implements <a class="el" href="classsir_1_1policy.html#aa799babbc9291dcdef56556b46edadd0">sir::policy</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/<a class="el" href="sir_8hh_source.html">sir.hh</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.9.7-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacesir.html">sir</a></li><li class="navelem"><a class="el" href="classsir_1_1default__policy.html">default_policy</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.2 </li>
  </ul>
</div>
</body>
</html>
